// 引入 request 文件
import request from './index.js'
// import { json } from 'node:stream/consumers';

export const getcreateHealthRecordHistory = (orderId) => {
	return request({
		url: `/healthRecords/getH5HealthRecords?orderId=${orderId}&pageNum=1&pageSize=999`,
		method: 'get',
	})
}

export const createHealthRecord = (insurantId,bloodPressureClass,bmi,bmr,bodyFat,userRecordAge,userRecordDiastolicBloodPressure,userRecordHeight,userRecordName,userRecordSex,userRecordSystolicBloodPressure,userRecordWeight,channelFrom,orderId) => {
	return request({
		url: `/healthRecords/create`,
		method: 'post',
		data: {
			  "bloodPressureClass": bloodPressureClass,
			  "bmi": bmi,
			  "bmr":bmr,
			  "bodyFat": bodyFat,
			  "userRecordAge": userRecordAge,
			  "userRecordDiastolicBloodPressure": userRecordDiastolicBloodPressure,
			  "userRecordHeight": userRecordHeight,
			  "userRecordName": userRecordName,
			  "userRecordSex": userRecordSex,
			  "userRecordSystolicBloodPressure": userRecordSystolicBloodPressure,
			  "userRecordWeight": userRecordWeight,
        "channelFrom": channelFrom,
        "orderId": orderId,
		}
	})
}
